package umlTool;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 * represent a parameter
 * 
 * @author Mimo
 *
 */
public class MethodParameter implements ISaveable {
	private String name;
	private String paramType;

	public MethodParameter(String name, String type) {
		this.name = name;
		this.paramType = type;
	}

	@Override
	public Element saveToXml(Document d) {
		Element elem = d.createElement("param");
		elem.setAttribute("name", getName());
		elem.setAttribute("paramType", getParamType());
		return elem;
	}

	void setName(String name) {
		this.name = name;
	}

	String getName() {
		return name;
	}

	void setParamType(String paramType) {
		this.paramType = paramType;
	}

	String getParamType() {
		return paramType;
	}
}
